<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>原型链继承直接继承</title>
</head>
<body>

<script>

    function Person() {}
    Person.prototype.foot = 2;
    Person.prototype.head = 1;

    function Student(name, no) {
        this.name = name;
        this.no = no;
    }
    // Student.prototype.constructor ==Student
    //
    Student.prototype = Person.prototype;
    Student.prototype.constructor = Student;
    var stu = new Student("薛头","22");
    // alert(stu.constructor)
    alert(stu.name)
    alert(stu.foot)

</script>
</body>
</html>